package com.gxl.design.builderpattern.builder;

import com.gxl.design.builderpattern.Bracelet;
import com.gxl.design.builderpattern.Clothes;
import com.gxl.design.builderpattern.Hat;
import com.gxl.design.builderpattern.Shoes;

public class OrderBuilder {

    public Order buildAOrder(){
        Order order = new Order();
        order.addGoods(new Bracelet());
        order.addGoods(new Clothes());
        order.printGoodsList();
        System.out.println(order.getSumOfPrice());
        return  order;
    }
    public Order buildBOrder(){
        Order order = new Order();
        order.addGoods(new Bracelet());
        order.addGoods(new Shoes());
        order.addGoods(new Hat());
        order.addGoods(new Clothes());
        order.printGoodsList();
        System.out.println(order.getSumOfPrice());
        return order;
    }
}
